package com.sz.rexiang.Fragment;

import org.xutils.x;

import android.app.Activity;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

public class BaseFragment extends Fragment {

	public View contentView;
	public Activity mAc;

	 private boolean injected = false;

	    @Override
	    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
	        injected = true;
	        return x.view().inject(this, inflater, container);
	    }

	    @Override
	    public void onViewCreated(View view, Bundle savedInstanceState) {
	        super.onViewCreated(view, savedInstanceState);
	        if (!injected) {
	            x.view().inject(this, this.getView());
	        }
	        mAc = this.getActivity();
	        contentView = this.getView();
	    }

}
